Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(parser): Switch literal impl's from one_of to literal #464

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

epage
Copy link
Collaborator

@epage epage commented Feb 7, 2024

Originally, this was going to be done for performance reasons but when
comparing this to the previous commit, tag(char) / char slowed down
dramatically in the next_slice benchmark.

However, json benchmark was unchanged. This also (slightly)
simplifies traces, is more direct in what it says, and does still speed
things up for UTF-8-exclusive chars, so going forward with it.

Fixes #418
Fixes #427

BREAKING CHANGE: char parers now always return char as the output
and now require I: Compare<char>

BREAKING CHANGE: u8 parers now require I: Compare<u8>

Originally, this was going to be done for performance reasons but when
comparing this to the previous commit, `tag(char)` / `char` slowed down
dramatically in the `next_slice` benchmark.

However, `json` benchmark was unchanged.  This also (slightly)
simplifies traces, is more direct in what it says, and does still speed
things up for UTF-8-exclusive `char`s, so going forward with it.

Fixes winnow-rs#418

BREAKING CHANGE: `char` parers now always return `char` as the output
and now require `I: Compare<char>`
Based on how `char` went, I figured we will likely see similar.

Fixes winnow-rs#427

BREAKING CHANGE: `u8` parers now  require `I: Compare<u8>`
@epage epage force-pushed the tagged branch 2 times, most recently from 040aede to 49678ec Compare February 7, 2024 17:44
@coveralls
Copy link

coveralls commented Feb 7, 2024

Pull Request Test Coverage Report for Build 7818956700

  • -4 of 5 (20.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 42.7%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ascii/mod.rs 0 2 0.0%
src/parser.rs 1 3 33.33%
Totals Coverage Status
Change from base Build 7818240433: 0.1%
Covered Lines: 1319
Relevant Lines: 3089

💛 - Coveralls

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3373ba1) 42.60% compared to head (502a36f) 42.57%.

Files Patch % Lines
src/ascii/mod.rs 0.00% 2 Missing ⚠️
src/parser.rs 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
- Coverage   42.60%   42.57%   -0.04%     
==========================================
  Files          18       18              
  Lines        3089     3089              
==========================================
- Hits         1316     1315       -1     
- Misses       1773     1774       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@epage epage merged commit 338b15d into winnow-rs:main Feb 7, 2024
15 of 17 checks passed
@epage epage deleted the tagged branch February 7, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants